package study3;
//接口没有继承限制  可以是多个接口的子类  当继承和接口同时使用时 先extend 后implements
public class MessageImpl implements IMessage,INews{
    @Override
    public String msg() {
        return "hello bit";
    }
    @Override
    public void getNews() {
        System.out.println("hello news~");
    }
    public static void main(String[] args) {
        IMessage message = new MessageImpl();
        System.out.println(message.msg());
        INews news = (INews) message;
        news.getNews();
    }
}
